home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
wheels2.arc
/
SAFEWRIT.LIB
< prev
next >
Wrap
Text File
|
1985-06-28
|
1KB
|
29 lines
{@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
The purchaser of these procedures and functions may include them in COMPILED
programs freely, but may not sell or give away the source text.
If you try to WRITE a byte that represents a control character, it may play
havoc with your output. SAFEWRITE writes the equivalent letter value in
low video--e.g., chr(1) equals Control-A, so it prints as a dim A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
{==============================================================}
procedure SafeWrite(A: byte);
begin
LowVideo;
case A of
0: write('@');
1..26: write(chr(A + 64));
27: write('[');
28: write('\');
29: write(']');
30: write(chr(24));
31: write(chr(25));
else
HighVideo;
write(chr(A));
end; {case}
HighVideo;
end;
{==============================================================}